package com.zhongke.cotrun.model.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhongke.cotrun.model.validator.UserValidator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel(value="com.zhongke.cotrun.model.pojo.SignUpInfo",description="活动报名详情表")
public class SignUpInfo implements Serializable {

    @ApiModelProperty(value="详情ID",name="detailId",example = "100")
    @TableId(type = IdType.AUTO)
    @NotNull(message = "主键ID",groups = {UserValidator.UpDate.class})
    private Long detailId;

    @ApiModelProperty(value="信息状态 0:正常 1:订单取消",name="state",example = "0")
    private Integer state;

    @ApiModelProperty(value="活动ID",name="activityId",example = "100",required = true)
    @NotNull(message = "活动ID不能为空",groups = {UserValidator.InSet.class, UserValidator.UpDate.class})
    private Long activityId;

    @ApiModelProperty(value="姓名",name="realName",example = "张三")
    private String realName;

    @ApiModelProperty(value="电话",name="phoneNumber",example = "+86 010 12345678")
    private String phoneNumber;

    @ApiModelProperty(value="工作单位",name="workUnit",example = "中科")
    private String workUnit;

    @ApiModelProperty(value="职务",name="jobDuties",example = "测试")
    private String jobDuties;

    @ApiModelProperty(value="订单号",name="orderCode",required = true)
    @NotNull(message = "订单号不能为空",groups = {UserValidator.InSet.class, UserValidator.UpDate.class})
    private String orderCode;

    @ApiModelProperty(value="创建时间",name="createTime",example = "2020-03-23 16:22:23")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

}
